package com.tqjc.common.ScheduledTask;
import com.tqjc.system.core.redis.TaskRedisApi;
import com.tqjc.utils.PlcOperator;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @projectName: BaotouSteel
 * @className: AccessControlScheduleTask
 * @author: Patienyon
 * @description: 门禁定时任务
 * @date: 2023-07-05 16:25
 */
@Component
public class AccessControlScheduleTask {

    public final static String STOCK_LOCK_PREFIX = "lock_stock_";
    @Resource
    TaskRedisApi taskRedisApi;

    @Resource
    PlcOperator plcOperator;

    public boolean getIsStockLockByStockId(Integer stockId) {
        if (taskRedisApi.hasKey(STOCK_LOCK_PREFIX + stockId)) {
            return true;
        }
        return false;

    }


}
